/* 企业文档存储系统样式 */

/* Bootstrap基础样式（简化版） */
.container, .container-fluid { max-width: 100%; margin: 0 auto; padding: 0 15px; }
.row { display: flex; flex-wrap: wrap; margin: 0 20px; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; padding: 0 15px; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; padding: 0 15px; }
.col-md-9 { flex: 0 0 90%; max-width: 90%; padding: 0 15px; }
.col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; padding: 0 15px; }

/* 基础样式 */
body { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    margin: 0;
    background-color: #f8f9fa;
}

/* 导航栏 */
.navbar {
    background-color: #17a2b8 !important;
    padding: 1rem;
    margin-bottom: 0;
}

.navbar-brand {
    color: white !important;
    font-weight: bold;
    font-size: 1.25rem;
}

.nav-link {
    color: rgba(255,255,255,0.9) !important;
    text-decoration: none;
    padding: 0.5rem 1rem;
}

.nav-link:hover {
    color: white !important;
}

.navbar-nav {
    display: flex;
    margin-left: auto;
}

/* 卡片样式 */
.card {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background-color: white;
    margin-bottom: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
}

.card-header {
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.card-body {
    padding: 1rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease-in-out;
}

.btn-primary { background-color: #0d6efd; border-color: #0d6efd; color: white; }
.btn-primary:hover { background-color: #0b5ed7; border-color: #0a58ca; }

.btn-info { background-color: #17a2b8; border-color: #17a2b8; color: white; }
.btn-info:hover { background-color: #138496; border-color: #117a8b; }

.btn-success { background-color: #198754; border-color: #198754; color: white; }
.btn-success:hover { background-color: #157347; border-color: #146c43; }

.btn-danger { background-color: #dc3545; border-color: #dc3545; color: white; }
.btn-danger:hover { background-color: #bb2d3b; border-color: #b02a37; }

.btn-outline-primary { color: #0d6efd; border-color: #0d6efd; background: transparent; }
.btn-outline-primary:hover { background-color: #0d6efd; color: white; }

.btn-outline-info { color: #17a2b8; border-color: #17a2b8; background: transparent; }
.btn-outline-info:hover { background-color: #17a2b8; color: white; }

.btn-outline-danger { color: #dc3545; border-color: #dc3545; background: transparent; }
.btn-outline-danger:hover { background-color: #dc3545; color: white; }

.btn-secondary { background-color: #6c757d; border-color: #6c757d; color: white; }

.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.875rem; }
.btn-group { display: inline-flex; }
.btn-group .btn { margin-right: -1px; }
.btn-group .btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.btn-group .btn:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.btn-group .btn:not(:first-child):not(:last-child) { border-radius: 0; }

.w-100 { width: 100% !important; }

/* 表单样式 */
.form-label {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-control {
    display: block;
    width: calc(100% - 20px);
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    background-color: white;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-text {
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #6c757d;
}

.mb-3 { margin-bottom: 1rem; }

/* 列表组样式 */
.list-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.list-group-item {
    position: relative;
    display: block;
    padding: 0.75rem 1rem;
    color: #212529;
    text-decoration: none;
    background-color: white;
    border: 1px solid #dee2e6;
    border-top-width: 0;
}

.list-group-item:first-child { border-top-width: 1px; }

.list-group-item-action {
    color: #495057;
    transition: background-color 0.15s ease-in-out;
}

.list-group-item-action:hover {
    background-color: #f8f9fa;
    color: #16181b;
}

.list-group-item.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.list-group-flush .list-group-item { border-width: 0 0 1px; }

/* 表格样式 */
.table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

.table-hover tbody tr:hover {
    background-color: rgba(0,0,0,0.025);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0,0,0,0.025);
}

.table-responsive {
    overflow-x: auto;
}

/* 警告框样式 */
.alert {
    position: relative;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

.alert-info {
    color: #055160;
    background-color: #cff4fc;
    border-color: #b6effb;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    color: white;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.bg-info { background-color: #17a2b8; }
.bg-success { background-color: #198754; }
.bg-warning { background-color: #ffc107; color: #000; }
.bg-danger { background-color: #dc3545; }

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1055;
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
    background-color: rgba(0,0,0,0.5);
}

.modal.fade { transition: opacity 0.15s linear; }
.modal.show { display: block; }

.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 500px;
    pointer-events: none;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
}

.modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.modal-title {
    margin-bottom: 0;
    line-height: 1.5;
    font-weight: 600;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    flex-shrink: 0;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem;
    border-top: 1px solid #dee2e6;
    gap: 0.5rem;
}

.btn-close {
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='m.235.757 14.618 14.618m-14.618 0L14.853.757'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0;
    width: 1em;
    height: 1em;
    padding: 0.25em 0.25em;
    color: #000;
    border-radius: 0.375rem;
    opacity: 0.5;
    cursor: pointer;
}

.btn-close:hover { opacity: 0.75; }

/* 进度条样式 */
.progress {
    display: flex;
    height: 1rem;
    overflow: hidden;
    font-size: 0.75rem;
    background-color: #e9ecef;
    border-radius: 0.375rem;
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: white;
    text-align: center;
    white-space: nowrap;
    background-color: #0d6efd;
    transition: width 0.6s ease;
}

/* 工具类 */
.d-none { display: none !important; }
.d-flex { display: flex !important; }
.d-block { display: block !important; }
.d-inline-block { display: inline-block !important; }

.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }

.text-center { text-align: center !important; }
.text-muted { color: #6c757d !important; }
.text-white { color: white !important; }

.bg-light { background-color: #f8f9fa !important; }

.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.ms-auto { margin-left: auto !important; }

.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075) !important;
}

/* 文件图标 */
.file-icon {
    margin-right: 0.5rem;
    font-size: 1.2em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .col-md-3, .col-md-6, .col-md-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .container-fluid {
        padding: 0 10px;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group .btn {
        padding: 0.25rem 0.4rem;
        font-size: 0.8rem;
    }
}

/* 登录页面专用样式 */
.bg-light {
    background-color: #f8f9fa;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}